/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.zx.course.entity;

import java.math.BigDecimal;
import java.util.List;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.entity.TreeEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.modules.app.course.exercise.record.entity.TcourseExerciseRecord;
import com.jeesite.modules.app.user.entity.AppUser;

/**
 * 课程表Entity
 * @author zpp
 * @version 2020-01-19
 */
@Table(name="t_courses", alias="a", columns={
		@Column(name="id", attrName="id", label="主键", isPK=true),
		@Column(name="course_title", attrName="courseTitle", label="课程标题", queryType=QueryType.LIKE, isTreeName=true),
		@Column(name="course_simple", attrName="courseSimple", label="课程简介"),
		@Column(name="course_cover", attrName="courseCover", label="课程封面图"),
		@Column(name="course_content", attrName="courseContent", label="课程内容"),
		@Column(name="course_label", attrName="courseLabel", label="课程标签"),
		@Column(name="course_item", attrName="courseItem", label="课程分类"),
		@Column(name="teacher_login_code", attrName="teacherLoginCode", label="讲师的登录名"),
		@Column(name="course_price", attrName="coursePrice", label="课程价格"),
		@Column(name="teacher_id", attrName="teacherId", label="讲师主键"),
		@Column(name="like_num", attrName="likeNum", label="点赞量"),
		@Column(name="course_explain", attrName="courseExplain", label="课程说明0代表课程；1表示课时"),
		@Column(name="look_num", attrName="lookNum", label="观看量"),
		@Column(name="answer",attrName="answer",label="答案字段"),
		@Column(name="analysis",attrName="analysis",label="解析"),
		@Column(includeEntity=TreeEntity.class),
		@Column(includeEntity=DataEntity.class),
		@Column(name="score",attrName="score",label="分数"),
		@Column(name="post",attrName="post",label="岗位"),
		@Column(name="recommend",attrName="recommend",label="推荐字段"),
	}, orderBy="a.update_date DESC"
)
public class Tcourses extends TreeEntity<Tcourses> {
	
	private static final long serialVersionUID = 1L;
	private String courseTitle;		// 课程标题
	private String courseSimple;		// 课程简介
	private String courseCover;		// 课程封面图
	private String courseContent;		// 课程内容
	private String courseLabel;		// 课程标签
	private String courseItem;		// 课程分类
	private String teacherLoginCode;		// 讲师的登录名
	private Double coursePrice;		// 课程价格
	private String teacherId;		// 讲师主键
	private Integer likeNum;		// 点赞量
	private Integer courseExplain;		// 课程说明0代表课程；1表示课时
	private Integer lookNum;		// 观看量
	private AppUser appUser=new AppUser();
	private Integer answer;
	private String analysis;//解析
	private BigDecimal score;
	private boolean checked=false;
	private String userName;
	private String userCode;
	private String difference;
	private String post;
	private Integer recommend;
    private boolean video=true;
	private List<Tcourses> childList;
	private String answerStr;

	public boolean isVideo() {
		return video;
	}

	public void setVideo(boolean video) {
		this.video = video;
	}

	public String getAnswerStr() {
		return answerStr;
	}

	public void setAnswerStr(String answerStr) {
		this.answerStr = answerStr;
	}

	public Integer getRecommend() {
		return recommend;
	}
	public void setRecommend(Integer recommend) {
		this.recommend = recommend;
	}
	public String getPost() {
		return post;
	}
	public void setPost(String post) {
		this.post = post;
	}
	@Override
	@ExcelField(title="编码", attrName="id", align=Align.CENTER, sort=1)
	public String getId() {
		return super.getId();
	}
	public String getDifference() {
		return difference;
	}

	public void setDifference(String difference) {
		this.difference = difference;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public BigDecimal getScore() {
		return score;
	}

	public void setScore(BigDecimal score) {
		this.score = score;
	}

	public String getAnalysis() {
		return analysis;
	}

	public void setAnalysis(String analysis) {
		this.analysis = analysis;
	}

	public AppUser getAppUser() {
		return appUser;
	}

	public void setAppUser(AppUser appUser) {
		this.appUser = appUser;
	}

	public Integer getAnswer() {
		return answer;
	}

	public void setAnswer(Integer answer) {
		this.answer = answer;
	}

	public Tcourses() {
		this(null);
	}

	public Tcourses(String id){
		super(id);
	}
	
	@Override
	public Tcourses getParent() {
		return parent;
	}

	@Override
	public void setParent(Tcourses parent) {
		this.parent = parent;
	}
	
	@Length(min=0, max=64, message="课程标题长度不能超过 64 个字符")
	@ExcelField(title="数据名称", attrName="courseTitle", align=Align.CENTER, sort=2)
	public String getCourseTitle() {
		return courseTitle;
	}

	public void setCourseTitle(String courseTitle) {
		this.courseTitle = courseTitle;
	}
	
	@Length(min=0, max=255, message="课程简介长度不能超过 255 个字符")	
	public String getCourseSimple() {
		return courseSimple;
	}

	public void setCourseSimple(String courseSimple) {
		this.courseSimple = courseSimple;
	}
	
	@Length(min=0, max=300, message="课程封面图长度不能超过 300 个字符")
	public String getCourseCover() {
		return courseCover;
	}

	public void setCourseCover(String courseCover) {
		this.courseCover = courseCover;
	}
	
	@ExcelField(title="数据内容", attrName="courseContent", align=Align.CENTER, sort=3)
	public String getCourseContent() {
		return courseContent;
	}

	public void setCourseContent(String courseContent) {
		this.courseContent = courseContent;
	}
	
	@Length(min=0, max=255, message="课程标签长度不能超过 255 个字符")
	@ExcelField(title="数据标签(只需要给课程添加标签)", attrName="courseLabel", align=Align.CENTER, sort=4)
	public String getCourseLabel() {
		return courseLabel;
	}

	public void setCourseLabel(String courseLabel) {
		this.courseLabel = courseLabel;
	}
	
	@Length(min=0, max=20, message="课程分类长度不能超过 20 个字符")
	@ExcelField(title="数据分类(只需要给课程添加分类)", attrName="courseItem", align=Align.CENTER, sort=5)
	public String getCourseItem() {
		return courseItem;
	}

	public void setCourseItem(String courseItem) {
		this.courseItem = courseItem;
	}
	
	
	
	public String getTeacherLoginCode() {
		return teacherLoginCode;
	}

	public void setTeacherLoginCode(String teacherLoginCode) {
		this.teacherLoginCode = teacherLoginCode;
	}
	@ExcelField(title="讲师主键", attrName="teacherId", align=Align.CENTER, sort=6)
	public String getTeacherId() {
		return teacherId;
	}

	public void setTeacherId(String teacherId) {
		this.teacherId = teacherId;
	}
	@ExcelField(title="数据价格", attrName="coursePrice", align=Align.CENTER, sort=6)
	public Double getCoursePrice() {
		return coursePrice;
	}

	public void setCoursePrice(Double coursePrice) {
		this.coursePrice = coursePrice;
	}
	
	
	
	public Integer getLikeNum() {
		return likeNum;
	}

	public void setLikeNum(Integer likeNum) {
		this.likeNum = likeNum;
	}
	@ExcelField(title="数据说明(必填项,0课程；1课时)", attrName="courseExplain", align=Align.CENTER, sort=7)
	public Integer getCourseExplain() {
		return courseExplain;
	}

	public void setCourseExplain(Integer courseExplain) {
		this.courseExplain = courseExplain;
	}
	
	public Integer getLookNum() {
		return lookNum;
	}

	public void setLookNum(Integer lookNum) {
		this.lookNum = lookNum;
	}
	
}